home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
AmigActive 2
/
AACD 2.iso
/
AACD
/
Magazine
/
GraphicsCards
/
StormMesa
/
src
/
rect.s
< prev
next >
Wrap
Text File
|
1999-02-04
|
2KB
|
87 lines
; Storm C Compiler
; Work2:Mesa3/Mesa-3.0/src/rect.c
mc68030
mc68881
XREF _gl_End
XREF _gl_Begin
XREF _gl_error
XREF _CC
SECTION "_gl_Rectf:0",CODE
;void gl_Rectf( GLcontext *ctx, GLfloat x1, GLfloat y1, GLfloat x2, G
XDEF _gl_Rectf
_gl_Rectf
move.l a2,-(a7)
fmovem.x fp2/fp3/fp4/fp5,-(a7)
move.l $38(a7),a2
fmove.s $48(a7),fp2
fmove.s $44(a7),fp3
fmove.s $3C(a7),fp4
fmove.s $40(a7),fp5
L3
; if (INSIDE_BEGIN_END(ctx))
move.l a2,a0
add.l #$E968,a0
move.l (a0),d0
cmp.l #$1A00,d0
beq.b L5
L4
; gl_error( ctx, GL_INVALID_OPERATION, "glRect" );
move.l #L2,-(a7)
pea $502.w
move.l a2,-(a7)
jsr _gl_error
add.w #$C,a7
fmovem.x (a7)+,fp2/fp3/fp4/fp5
move.l (a7)+,a2
rts
L5
; gl_Begin( ctx, GL_QUADS );
pea 7.w
move.l a2,-(a7)
jsr _gl_Begin
addq.w #$8,a7
; (*ctx->Exec.Vertex2f)( ctx, x1, y1 );
fmove.s fp5,-(a7)
fmove.s fp4,-(a7)
move.l a2,-(a7)
move.l $8BC(a2),a0
jsr (a0)
add.w #$C,a7
; (*ctx->Exec.Vertex2f)( ctx, x2, y1 );
fmove.s fp5,-(a7)
fmove.s fp3,-(a7)
move.l a2,-(a7)
move.l $8BC(a2),a0
jsr (a0)
add.w #$C,a7
; (*ctx->Exec.Vertex2f)( ctx, x2, y2 );
fmove.s fp2,-(a7)
fmove.s fp3,-(a7)
move.l a2,-(a7)
move.l $8BC(a2),a0
jsr (a0)
add.w #$C,a7
; (*ctx->Exec.Vertex2f)( ctx, x1, y2 );
fmove.s fp2,-(a7)
fmove.s fp4,-(a7)
move.l a2,-(a7)
move.l $8BC(a2),a0
jsr (a0)
add.w #$C,a7
; gl_End( ctx );
move.l a2,-(a7)
jsr _gl_End
addq.w #4,a7
fmovem.x (a7)+,fp2/fp3/fp4/fp5
move.l (a7)+,a2
rts
L2
dc.b 'glRect',0
END